package com.jvm.spring;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping
public class Controllers {



    @RequestMapping("/st")
    @ResponseBody
    public String string (String s){
        if (s.equals("1")){

            s = "2";
            System.out.println("第一次跳转");
            return "redirect:st?s="+s;
        }


        return "ss";
    }


}
